home *** CD-ROM | disk | FTP | other *** search
/ Mission 3 / Mission 3.zip / Mission 3.iso / texte / 7up_pd / assert.h < prev    next >
Text File  |  1998-10-29  |  639b  |  39 lines

  1. /*      ASSERT.H
  2.  
  3.         Diagnostic Includes
  4.  
  5.         Copyright (c) Borland International 1990
  6.         All Rights Reserved.
  7. */
  8.  
  9.  
  10.  
  11. #if !defined( __ASSERT )
  12. #define __ASSERT
  13.  
  14. #if !defined(NDEBUG)
  15.  
  16. #if     !defined(__STDLIB)
  17. #include <stdlib.h>
  18. #endif
  19.  
  20. #if     !defined( __STDIO )
  21. #include <stdio.h>
  22. #endif
  23.  
  24. #define assert( expr )\
  25.     ((void)((expr)||(fprintf( stderr, \
  26.     "\nAssertion failed: %s, file %s, line %d\n",\
  27.      #expr, __FILE__, __LINE__ ),\
  28.      ((int (*)(void))abort)())))
  29. #else
  30.  
  31. #define assert( expr )
  32.  
  33. #endif
  34.  
  35.  
  36. #endif
  37.  
  38. /************************************************************************/
  39. ə